package com.wondertek.poms.dao.po;

import com.fasterxml.jackson.annotation.JsonInclude;
import lombok.Data;
import org.hibernate.annotations.DynamicInsert;
import org.hibernate.annotations.DynamicUpdate;
import org.hibernate.annotations.Proxy;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;

/**
 * @author chenjijiang
 * @description
 */
@Data
@Entity
@Table(name = "CP_INFO")
@DynamicUpdate
@DynamicInsert
@Proxy(lazy = false)
@JsonInclude(JsonInclude.Include.NON_NULL)
public class CpInfo implements Serializable {
	private static final long serialVersionUID = 7048502679561556864L;

	/**
	 * id
	 */
	@Id
	@GeneratedValue(strategy = GenerationType.AUTO, generator = "CP_INFO_SEQ")
	@SequenceGenerator(name = "CP_INFO_SEQ", allocationSize = 1, sequenceName = "CP_INFO_SEQ")
	private Long id;

	/**
	 *  弃用
	 */
	@Column(name = "BL_CP_ID")
	private Long blCpId;

	/**
	 * 弃用
	 */
	@Column(name = "BL_CP_NAME")
	private String blCpName;

	/**
	 * CpID号
	 */
	@Column(name = "CP_ID")
	private Long cpId;

	/**
	 * CP名称
	 */
	@Column(name = "CP_NAME")
	private String cpName;


	/**
	 * CPid和名称
	 */
	@Transient
	private String cpIdAndCpName;

}